class Response {
    status = 0
    msg = undefined
    data = undefined
}


function success(data) {
    let ret = new Response()
    ret.status = 0
    ret.msg = "success"
    ret.data = data
    return ret
}

function failure(msg) {
    let ret = new Response()
    ret.msg = msg
    return ret
}

module.exports.success = success
module.exports.failure = failure